import storageUtil from './storageUtil'
export default{
    initAddress(){
        // console.log("initaddress")
        navigator.geolocation.getCurrentPosition((pos)=>{
         var coords = { latitude: pos.coords.latitude, longitude:pos.coords.longitude}
         
        //  console.log(coords)
            storageUtil.setCoords(coords)
            return coords
        },function(){
            console.log("获取位置失败");
        },{
            // 配置对象
            timeout: 10000
        });
	  }
}